org 1000
mov cx ,100
mov di,1600h 
mov si,2000h
mov ax,0
next:
mov [di],ax ;1600 adresini dolduruyoruz
inc ax      ;1600 adresini dolduruyoruz
inc di      ;1600 adresini dolduruyoruz
loop next
mov cx,50 
mov bx,0

 
next2:
mov ax,bx
inc bx
sar ax ,1


jc abaa 
 
mov [si],1
jmp d  

abaa:mov [si],2
d:inc si

loop next2  

mov si,2032h 
mov cx,50
next3:
mov ax,bx
inc bx
sar ax ,1
 
 

jc aa 
 
mov [si],2
jmp ddd  

aa:mov [si],1
ddd:inc si 

loop next3


